package com.lovo.shirodemo.controller;


import com.lovo.shirodemo.model.dto.FunctionInfoDTO;
import com.lovo.shirodemo.result.ResponseResult;
import com.lovo.shirodemo.service.FunctionInfoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bdk
 * @since 2020-11-26
 */
@RestController
@RequestMapping("/functions")
public class FunctionInfoController {
    @Resource
    private FunctionInfoService functionInfoService;
    @PostMapping
    @ResponseResult
    public Object addFunction(@RequestBody FunctionInfoDTO functionInfoDTO){
        functionInfoService.saveFunction(functionInfoDTO);
        return null;
    }

}

